package collection.map;

import java.util.HashMap;

public class HashMapSample {
    public static void main(String[] args) {
        HashMap<String, Object> student = new HashMap<>();
        student.put("name", "kk");
        Object name = student.put("name", "dz");
        System.out.println(name + "以替换为dz");
        student.put("age", 24);
        student.put("height", 182);
        student.put("weight", 60);
        System.out.println(student);

        boolean r1 = student.containsKey("name");
        System.out.println(r1);
        // Output: true

        boolean r2 = student.containsValue("60");
        System.out.println(r2);

        int count = student.size();
        System.out.println(count);

        Integer w = (Integer) student.remove("weight");
        System.out.println(w);
        // Output: 60


    }
}
